$(function(){
    //*********************************************头部*******************************************
    var a=0;
    var ul=$("#navList_content ul");
    ul.hover(function(){
        a=$(this).index();
        for(var i=0;i<ul.length;i++){
            //清除原来样式
            ul[i].className=ul[i].className.replace('selected','');
        }
        ul[a].className+='selected';
    })
    var b=0;
    var li=$(".number ul li");
    //*********************************************轮播*******************************************
    setInterval(function(){
        for(var i=0;i<li.length;i++){
            //清除原来样式
            $("#pics img")[i].className=$("#pics img")[i].className.replace('temp_img','');
            $("#roll_pic_intro span")[i].className=$("#roll_pic_intro span")[i].className.replace('temp_span','');
            li[i].className=li[i].className.replace("temp_li",'');
        }
        $("#pics img")[b].className='temp_img';
        $("#roll_pic_intro span")[b].className='temp_span';
        li[b].className='temp_li';
        if(b<5){
            b++;
        }else{
            b=0;
        }
    },2000)

    //*********************************************图片*******************************************
    li.click(function(){
        b=$(this).index();
        for(var i=0;i<li.length;i++){
            //清除原来样式
            $("#pics img")[i].className=$("#pics img")[i].className.replace('temp_img','');
            $("#roll_pic_intro span")[i].className=$("#roll_pic_intro span")[i].className.replace('temp_span','');
            li[i].className=li[i].className.replace("temp_li",'');
        }
        $("#pics img")[b].className='temp_img';
        $("#roll_pic_intro span")[b].className='temp_span';
        li[b].className='temp_li';
    })
});